package Ch6;

import java.util.Arrays;

public class ArrayCopy2 {

	public static void main(String[] args) {
		
		int[] arr = {1,2,3,4,5};
		
		int[] arr2 = new int[ arr.length * 2];
		
		for (int i = 0; i < arr.length; i++){
			arr2[i] = arr[i];
		}
		
		arr2[arr.length] = 6;
		
		System.out.println(Arrays.toString(arr2));
	}
	
}
